Conventional techniques for detecting a defective pixel in a two dimensional image capturing element such as a CCD, and correcting the defective pixel by utilizing the pixels around that pixel, are known.
Japanese Patent Laid-open Publication No. Hei 9-238355 discloses a technique for removing line crawl by outputting a Gb in a Bayer array after being multiplied by a line crawl correction, and outputting Gr intact.
“Line crawl” is a phenomena which may occur under the following conditions. That is, when a color filter comprising R, G, B small color filters in a Bayer array is provided on a light receiving filter, a long wavelength light which has passed through an R small color filter reaches a deeper site under the light receiving surface and generates electric charge therein. The charge then leaks into the adjacent pixels, becoming noise. With such noise, or electric charge invading into pixels having B or G small filters, the sensitivities of the respective pixels become inconsistent, even when an image of a uniformly colored object having no pattern is captured. Line crawl occurs not only in filters employing a Bayer array, but also in those employing any other color arrays.
Defective pixels of an image capturing element, such as a CCD, may inconsistently increase or decrease due to, for example, increased temperature, long time exposure, and so forth. To detect and correct such a defective pixel, pixels surrounding that pixel are utilized.
However, use of the pixels adjacent to the focused pixel cannot guarantee accurate detection and correction due to the influence of line crawl. In order to avoid the influence of line crawl, use of four pixels in the detection and correction, which are located in lines of the same color as, and separated by one line from, the focused pixel is contemplated.
FIG. 14 illustrates a method for detecting and correcting a defect in a focused pixel. Specifically, among pixels in a Bayer array, or, precisely, pixels having color filters in a Bayer array, (hereinafter simply referred to as pixels), four pixels, namely, pixels 102 (G1), 104 (G2), 106 (G3), 108 (G4), which are located in vertical and horizontal directions relative to, and in lines of the same color as, the focused pixel, namely Gorg, are used as defect detection pixels.
For example, when the pixel Gorg is a G pixel in a G (green)/B (blue) line, four pixels, namely, G1, G2, G3, G4, which are located in G/B lines each separated by one line from the G/B line of the focused line, are used as defect detection pixels. Based on these four pixels G1, 62, G3, G4, the pixel value at the position of the pixel Gorg is estimated, and the estimated pixel value is compared to the actual pixel value of the pixel Gorg.
When the difference between the estimated and actual pixel values of the pixel Gorg is significantly large such that it exceeds a predetermined threshold, it is assumed that an inappropriate value which cannot be estimated based on the values of the pixels around the focused pixel be included, and it is concluded that the pixel Gorg is defective.
When the pixel Gorg is determined to be defective, the same four pixels G1, G2, G3, G4, used for the defect detection, are used also for correction of the pixel Gorg as correction pixels 110, 112, 114, 116. That is, the pixel value of the pixel Gorg is replaced by the estimated value based on pixels G1 through G4.
Use of the pixels surrounding but separated by one line from the focused pixel can eliminate the influence of line crawl. However, this manner of correction suffers from deteriorated sharpness of an image as the pixels used for the correction are separated from the focused pixel by one line.
In addition, should the original image have an edge in a diagonal direction, or a diagonal edge, which includes a defective pixel, application of this correction method results in undesirable disappearance of the diagonal edge, which should be inherent to the original image.
FIG. 15 shows an example in which the original image includes an edge 120 in the diagonal direction which includes the pixel Gorg. The defective pixel Gorg is corrected based on the pixels G1 through G4 located in vertical and horizontal directions relative to the defective pixel Gorg. However, as these pixels G1 through G4 contains no pixel information of the edge 120, the corrected pixel Gorg naturally contains no edge information. Therefore, the edge 120, which is present before the correction, partly disappears after the correction, as shown in FIG. 15 (b).
The present invention advantageously provides a device for reliably correcting a defective pixel while eliminating the influence of line crawl and preserving diagonal edges.